s = "姓名:{},性别:{},学号:{},专业:{}"
name = '李四'
gender = '男'
number = '123456'
major = 'ai'
out = s.format(name, gender, number, major)
print(out)
s_new = s+","+"年龄:{},班级:{}班"
age = 20
class_num = 1
out = s_new.format(name,gender,number,major,age, class_num)
print(out)

student_info = []
student_info.append(input("请输入姓名: "))
student_info.append(input("请输入性别: "))
student_info.append(input("请输入学号: "))
student_info.append(input("请输入专业: "))
student_info.append(input("请输入年龄: "))
student_info.append(input("请输入班级: "))
print("\n学生信息：")
print("姓名:", student_info[0])
print("性别:", student_info[1])
print("学号:", student_info[2])
print("专业:", student_info[3])
print("年龄:", student_info[4])
print("班级:", student_info[5])